package com.hk.commons;

public class CheckUserId {
	public static Long checkId(Long id) {
		Long newId = id;
		if (id != null && id.toString().length() > 14) {
			String idStr = id.toString();
			String newIdStr = idStr.substring(0, 14);
			newId = Long.valueOf(newIdStr);
		}
		return newId;
	}
	
	public static Long checkId(String id) {
		Long newId = null;
		if (StringHelper.isNotEmpty(id)){
			newId = Long.valueOf(id);
		}
				
		if (StringHelper.isNotEmpty(id) && id.toString().length() > 14) {
			String idStr = id.toString();
			String newIdStr = idStr.substring(0, 14);
			newId = Long.valueOf(newIdStr);
		}
		return newId;
	}
}
